﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:UI="clr-namespace:Mengsk.ProxyDelivery.App.UI.PageBar" x:Class="Mengsk.ProxyDelivery.App.UI.Accounting.SellerPayUserControl" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1400" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Text="交易编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbId" Margin="3" VerticalAlignment="Center" Width="100"/>
            <TextBlock Text="卖家编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbSellerId" Margin="3" VerticalAlignment="Center" Width="100"/>
            <TextBlock Text="操作员:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbOperator" Margin="3" VerticalAlignment="Center" Width="100"/>
            <TextBlock Text="支付类型" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Name="cbbPayTypes" Margin="3" VerticalAlignment="Center" Width="100" />

            <TextBlock Text="状态:" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Name="cbbState" Margin="3" VerticalAlignment="Center" Width="120"/>
            <TextBlock Text="创建时间:" Margin="3" VerticalAlignment="Center"/>
            <DatePicker Name="dpStart" Margin="3" VerticalAlignment="Center" Width="120"/>
            <TextBlock Text="到:" Margin="3" VerticalAlignment="Center"/>
            <DatePicker Name="dpEnd" Margin="3" VerticalAlignment="Center" Width="120"/>

            <Button Name="btnSearch" Content="查询" Margin="3" VerticalAlignment="Center" Width="80" Click="btnSearch_Click"/>
            <Button Name="btnMarkCompelete" Content="标记完成" Margin="3" VerticalAlignment="Center" Width="80" Click="btnMarkCompelete_Click"/>
            <Button Name="btnViewDetail" Content="查看详细" Margin="3" VerticalAlignment="Center" Width="80" Click="btnViewDetail_Click"/>
        </StackPanel>

        <DataGrid Grid.Row="1" Name="dgvItems" AutoGenerateColumns="False" IsReadOnly="True"  GridLinesVisibility="All">
            <DataGrid.Columns>
                <DataGridTextColumn Header="编号" Binding="{Binding Id}"/>
                <DataGridTextColumn Header="卖家编号" Binding="{Binding SellerId}"/>
                <DataGridTextColumn Header="支付类型" Binding="{Binding PayType,Converter={StaticResource descriptionConverter}}"/>
                <DataGridTextColumn Header="支付金额" Binding="{Binding TotalMoney,StringFormat=F2}"/>
                <DataGridTextColumn Header="手动完成操作员" Binding="{Binding ManualOperator}"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime,Converter={StaticResource datetimeConverter}}"/>
                <DataGridTextColumn Header="完成时间" Binding="{Binding CompleteTime,Converter={StaticResource datetimeConverter}}"/>
                <DataGridTextColumn Header="状态" Binding="{Binding State,Converter={StaticResource descriptionConverter}}"/>
                <DataGridTextColumn Header="交易描述" Binding="{Binding Comment}"/>
            </DataGrid.Columns>
        </DataGrid>
        <UI:PageBarUserControl Grid.Row="2" PageSize="200" x:Name="pbBar" PageChanging="pbBar_PageChanging"/>
    </Grid>
</UserControl>
